home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power Programmierung
/
Power-Programmierung (Tewi)(1994).iso
/
magazine
/
nan_news
/
vol1
/
no4
/
emails.prg
< prev
next >
Wrap
Text File
|
1987-04-15
|
878b
|
29 lines
*** get destination and message
ACCEPT "Send to: " TO m_dest
ACCEPT "Message: " TO m_text
*** call send message procedure
DO SENDM WITH m_dest, m_text
* SENDM Procedure
* ---------------
* Send message to Netname() specified by parameter 1
* Message text is in parameter 2
*
PROCEDURE SENDM
PARAMETER m_dest, m_text
PRIVATE m_current
*** open Mail file in shared mode (see LOCK.PRG) ***
NET_USE("mail", .F. , 0)
*** lock file and add blank record ***
* FIL_LOCK(0)
ADD_REC(0)
*** write message and destination ***
REPLACE dest WITH m_dest, message WITH m_text
*** write other statistics ***
REPLACE sender WITH GETE("NETNAME"), sdate WITH DATE(), stime WITH TIME()
*** unlock and close ***
UNLOCK
USE
RETURN